package org.jshand.internet;
import java.awt.Container;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.BorderFactory;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
public  class JComboBoxDemo03 implements ItemListener{  
    private JFrame jframe = new JFrame("Welcome to my blog");  
    private Container container = jframe.getContentPane();  
    private JComboBox jcb1 = null;  
    
    private JLabel label = new JLabel("www.csnd.net122");  
    private String fontSize[] = {"120", "122", "14", "16", "18", "20", "22", "24", "26", "48", "72"};  
   
    
    public JComboBoxDemo03(){  
        this.jframe.setLayout(new GridLayout(2, 1));  
       
          
        container.add(this.jcb1);  
        container.add(label);  
        this.jframe.setSize(300, 150);  
        this.jframe.setVisible(true);  
        this.jframe.addWindowListener(new WindowAdapter(){  
            public void windowClosing(WindowEvent e){  
                System.exit(1);  
            }  
        });  
    }  
      
    public void itemStateChanged(ItemEvent e){  
        if(e.getStateChange() == ItemEvent.SELECTED){  
            String itemSize = (String) e.getItem();  
            try{  
                System.out.println("---ItemEvent performed:" + e.paramString() + "---");  
            }catch(Exception ex){  
                  
            }  
        }  
    }  
    
   
    public static void main(String args[]){  
    	JComboBoxDemo03 myComboBox = new JComboBoxDemo03();  
    }  
      
      
}  
